import request from '@/utils/request';

// 查询活动列表
export function listMarket(data) {
  return request({
    url: '/console/market/listActivity',
    method: 'POST',
    data
  });
}
// 导出活动列表
export function exportMarket(data) {
  return request({
    url: '/console/market/exportActivity',
    method: 'POST',
    responseType: 'blob',
    data
  });
}
// 查询卡券列表
export function listCouponConfig(data) {
  return request({
    url: '/console/market/listCouponConfig',
    method: 'POST',
    data
  });
}
// 启用/禁用/删除卡券
export function editCouponConfig(data) {
  return request({
    url: '/console/market/editCouponConfig',
    method: 'POST',
    data
  });
}
// 产看
export function queryCouponConfig(data) {
  return request({
    url: '/console/market/queryCouponConfig',
    method: 'POST',
    data
  });
}
// 新增卡券
export function saveCouponConfig(data) {
  return request({
    url: '/console/market/saveCouponConfig',
    method: 'POST',
    data
  });
}
// 查询已发卡券列表
export function listUserCoupon(data) {
  return request({
    url: '/console/market/listUserCouponReceived',
    method: 'POST',
    data
  });
}
// 发放卡券
export function grantUserCoupon(data) {
  return request({
    url: '/console/market/grantUserCoupon',
    method: 'POST',
    data
  });
}
// 导出
export function exportCoupon(data) {
  return request({
    url: '/console/market/exportCoupon',
    method: 'POST',
    responseType: 'blob',
    data
  });
}
export function exportUsercouponReceived(data) {
  return request({
    url: '/console/market/exportUsercouponReceived',
    method: 'POST',
    responseType: 'blob',
    data
  });
}
export function queryCouponReceived(data) {
  return request({
    url: '/console/market/queryCouponReceived',
    method: 'POST',
    data
  });
}